// 引入封装的 axios 扩展
import axiosex from "../axiosex";
import type { IUserInfo } from "@/models/IUserInfo";
import type { IBaseRequest } from "@/models/IBaseRequest";
import type { IBaseResponse } from "@/models/IBaseResponse";
import type { IBasePagingData } from "@/models/IBasePagingData";
import type { IQueryByIntID } from "@/models/IQueryByIntID";

/**插入操作员信息 */
export const UserInfo_AddData = (data: IUserInfo) =>
  axiosex.post(
    "/api/UserInfo/AddData",
    data
  ) as unknown as IBaseResponse<IUserInfo>;
/**删除操作员信息 */
export const UserInfo_DeleteData = (data: IQueryByIntID) =>
  axiosex.delete("/api/UserInfo/DeleteData", {
    params: data,
  }) as unknown as IBaseResponse<Number>;

/**更新操作员信息 */
export const UserInfo_UpdateData = (data: IUserInfo) =>
  axiosex.put(
    "/api/UserInfo/UpdateData",
    data
  ) as unknown as IBaseResponse<Number>;
/**根据主键查询操作员信息 */
export const UserInfo_GetData = (data: IQueryByIntID) =>
  axiosex.get("/api/UserInfo/GetData", {
    params: data,
    // }) as unknown as IBaseResponse<IUserInfo>;
  }) as unknown as IBaseResponse<IUserInfo>;
/**分页查询操作员信息 */
export const UserInfo_GetPageData = (data: IBaseRequest<IUserInfo>) =>
  axiosex.post("/api/UserInfo/GetPageData", data) as unknown as IBaseResponse<
    IBasePagingData<IUserInfo>
  >;
/**登录 */
export const UserInfo_Login = (data: IUserInfo) =>
  axiosex.post("/api/UserInfo/Login", data) as unknown as IBaseResponse<string>;
